package com.yjhb.android.sbz.v2.mvp.presenter

import com.yjhb.android.sbz.http.HttpObserver
import com.yjhb.android.sbz.http.HttpTool
import com.yjhb.android.sbz.v2.entity.VipConfig
import com.yjhb.android.sbz.v2.mvp.V2ConventionPresenter
import com.yjhb.android.sbz.v2.mvp.view.VipConfigView


/**
 *  创建者 zx
 *  创建时间 2021/5/20 16:02
 */
class VipConfigPresenter(view: VipConfigView) : V2ConventionPresenter<VipConfigView>(view) {

    fun getVipConfigList() {
        model?.let {
            HttpTool.request(model.getVipConfigList(), object : HttpObserver<VipConfig>() {
                override fun onResult(data: VipConfig?) {
                    data?.let {
                        view.onVipConfig(it)
                    }
                }

                override fun onError(code: Int, msg: String?) {

                }
            })
        }
    }

}